package com.home766.controller.shop;

import net.biz.controller.shop.BaseController;
import net.biz.entity.Member;
import net.biz.util.JsonUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

@Controller
@RequestMapping("/util")
public class UtilComtroller extends BaseController {
	
	
	@ResponseBody
	@RequestMapping(value="/checkLogin")
	public String chekLogin(){
		Member m=getCurrent();
		Map<String, Object> result=new HashMap<String, Object>();
		result.put("type", "failure");
		if(null!=m){
			result.put("type", "success");
		}
		String str= JsonUtils.toJson(result);
		return str;
	}
 
}
